﻿using GameFramework;
using UnityEngine;
using UnityGameFramework.Runtime;
public class LoginPanel : UIFormLogic
{
    public GameObject firstForm;
    public GameObject loginForm;
	public ProcedureLogin procedureLogin ;
    /// <summary>
    ///登陆按钮
    /// </summary>
    public void LoginBtnClick()
    {
        //Debug.Log("登陆游戏");
        loginForm.SetActive(true);
        firstForm.SetActive(false);
    }

	/// <summary>
	/// 账号界面登陆按钮
	/// </summary>
	public void FinalLoginBtnClick()
	{
		//暂时先进入创建角色界面
		procedureLogin.CrateRole();
		//ChangeState<ProcedureChangeScene> (procedureOwner);
	}

    public void FemaleBtnClick(int id)
    {
        //读表
        //ActiveObjectConfig activeCfg = ActiveObjectConfig.GetRowById(id);
        //根据表数据MODEL，从资源列表加载
        //EntityComponent entity = UnityGameFramework.Runtime.GameEntry.GetComponent<EntityComponent>();

        //entity.ShowEntity<HeroFemale>(1, "Assets/Resources/Prefabs" + activeCfg.MODEL + ".prefab", "EntityGroup");
    }

    protected internal override void OnOpen(object userData)
    {
        base.OnOpen(userData);
        procedureLogin = (ProcedureLogin)userData;
    }
    //protected override void OnOpen(object userData)
    //{
    //    base.OnOpen(userData);
    //    procedureLogin = (ProcedureLogin)userData;
    //}


}
